<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>EHS中国信息管理系统</title>
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/core.js"></script>
    <script type="text/javascript" src="__TMPL__/Js/_doc.js"></script>
	<style>
	  table{border-collapse:collapse;border:none;line-height:16px;border:1px solid #ccc}
	  body{font-size:14px;}
	</style>
  </head>
  <body>
    <div style="margin:0 auto; text-align:center; padding:10px;">
      <div style="padding:2px;">
        <layout name="Public:doc-header" cache="0" />
        <div style="width:80%; float:left;">
          <table  align="center" cellpadding="0" cellspacing="1" width="100%">
            <tr align="center"><td >序号</td>
            <td >标题</td>
            <td >文件路径</td>
            <td >加入时间</td>
            <td >功能</td>
            </tr>
            <volist name="info" id="l">
              <tr>
                <td>{$i}</td><td>{$l.title}</td><td>{$l.file_url}</td><td>{$l.add_time}</td>
                <td><a href="#" onclick="clickPreview('{$l.id}')">预览</a>/<a href="#" onclick="clickPass('{$l.id}')">通过</a>/<a href="#" onclick="deleteUserRecord('{$l.id}')">删除</a></td>
              </tr>
            </volist>
          </table>
          <div>{$page}</div>
          <div id="divSwf">
            <!--    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="600">
                  <param name="movie" value="/admin_swf/{$url}" />
                  <param name="quality" value="high" />
                  <embed src="/admin_swf/{$url}" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="600" ></embed>
                </object>  -->
          </div>
        </div>
      </div>
      {/*<layout name="Public:doc-footer" cache="0" /> */}
    </div>
    <script>
      var url = "__URL__";

      function deleteUserRecord(id){
        var data = {id:id};
        $("#divSwf").html('');
        ajax.send(url+'/ajaxDeleteUserRecord',data,function(obj){
          window.location.href = url+'/userDoc';
        });
      }

      function clickPreview(id){
        var data = {id:id};
        $("#divSwf").html('');
        ajax.send(url+'/ajaxPreviewUserRecord',data,function(obj){
          var url = obj.data;
          var swf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="600">'
            +'<param name="movie" value="/admin_swf/'+url+'" />'
            +'<param name="quality" value="high" />'
            +'<embed src="/admin_swf/'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="600" ></embed>'
            +'</object>';
          $("#divSwf").html(swf);
        });
      }

      function clickPass(id){
        var data = {id:id};
        ajax.send(url+'/ajaxPassUserRecord',data,function(obj){
          window.location.href = url+'/userDoc';
        });
      }
      $("tr:odd").css("background-color","#eee"); 
    </script>
  </body>
</html>
